import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

const Lists = resolve => require(['./components/Lists'], resolve)
const User = resolve => require(['./components/User'], resolve)
const Detail = resolve => require(['./components/Detail'], resolve)
const Login = resolve => require(['./components/Login'], resolve)

export default new Router({
    routes: [
        {
            path: "/",
            name: "Lists",
            component: Lists
        },
        {
            path: "/user",
            name: "User",
            component: User
        },
        {
            path: "/Detail/:id",
            name: "Detail",
            component: Detail,
            props: true
        },
        {
            path: "/Login",
            name: "Login",
            component: Login,
            props: true
        }
    ]
});